package com.wenjiang.config;

import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 定时任务配置
 */
@Configuration
public class QuartzConfig {

//    @Autowired
//    UpdateHotGoodJob updateHotGoodJob;
//
//    @Bean
//    public JobDetail updateHotGoodJobDetail() {
//
//        JobDetail jobDetail =
//                JobBuilder.newJob(UpdateHotGoodJob.class).withIdentity("UpdateHotGoodJob", null).storeDurably().build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger job1CronTrigger() {
//        Trigger cronTrigger =
//                TriggerBuilder.newTrigger().forJob(updateHotGoodJobDetail()).withIdentity("UpdateHotGoodJob",
//                        null).startNow().withSchedule(CronScheduleBuilder.cronSchedule(updateHotGoodJob.getCron())).build();
//
//        return cronTrigger;
//    }


}
